<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*"%>
<%@ page import="javax.servlet.*,java.text.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>格式化日期示例</title>
</head>
<body>
	<div style="margin: auto; width: 80%">

		<center>
			<h1>当前时间格式化</h1>
		</center>
		<%
			Date dNow = new Date();
			SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a zzz");
			out.print("<h2 align=\"center\">" + ft.format(dNow) + "</h2>");
		%>
	</div>

</body>
</html>